<template>
  <div>
    主页123123123
    <span>{{fullName}}</span>
    <span>{{count}}</span>
    <button @click='handleClick'>点我</button>
  </div>
</template>

<script>
import { mapState, mapGetters, mapActions, mapMutations } from 'vuex'
export default {
  data () {
    return {
    }
  },
  computed: {
    ...mapState({
      count: state => state.a.text
    }),
    ...mapGetters(['fullName'])
  },
  methods: {
    handleClick () {
      // this.updateCountSync({ number: 10, time: 2000 })
      this['a/add'](10)
    },
    ...mapActions(['updateCountSync', 'a/add']),
    ...mapMutations(['addCounter', 'a/updateText'])
  }
}
</script>

<style scoped>
</style>
